package com.czk.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自定义随机算法
 *
 * @Author:ChenZhangKun
 * @Date: 2020/12/18 10:56
 */
@Configuration
public class MyselfRule {
    @Bean
    public IRule iRule() {
        // 定义为随机算法
        return new RandomRule();
    }
}
